package com.itheima;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Test1 {
    public static void main(String[] args) throws IOException {
        ClassLoader classLoader = Test1.class.getClassLoader();
        InputStream in = classLoader.getResourceAsStream("prop.properties");

        Properties prop = new Properties();
        prop.load(in);

        String name = prop.getProperty("name");
        String age = prop.getProperty("age");

        System.out.println(name);
        System.out.println(age);
        in.close();

    }
}
